<script src="../js/translate.min.js"></script>
<script type="module">
    translate.service.use('client.edge');
    const browser_language = translate.util.browserDefaultLanguage();
    translate.language.setDefaultTo(browser_language);
    translate.language.setLocal(browser_language);
    translate.listener.start();
    translate.ignore.text.push(/[lL]eo's +[sS]ite|[lL]eo/g);
    translate.execute();
    $(document).ready(() => {
        console.log(document.getElementById("translateSelectLanguage"));
        const translateSelectLanguage = $("#translateSelectLanguage");
        const header = $(".header");
        console.log(header, translateSelectLanguage);
        header.append(translateSelectLanguage);
    });
</script>
<div id="text"></div>
<script>
    function translateText(text){
        const divText = $("#text");
        divText.html(text);
        translate.execute(divText[0]);
        const res = divText.html();
        divText.html("");
        return res;
    }
</script>